package com.wn.ziroombackend.service.impl;

import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.wn.ziroombackend.entity.OrderClr;
import com.wn.ziroombackend.entity.vo.OrderIdClrVo;
import com.wn.ziroombackend.mapper.OrderClrMapper;
import com.wn.ziroombackend.service.OrderClrService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author wangzhijia
 * @since 2023-02-27 10:56:29
 */
@Service
public class OrderClrServiceImpl extends ServiceImpl<OrderClrMapper, OrderClr> implements OrderClrService {

    @Autowired
    OrderClrMapper orderClrMapper;

    @Override
    public PageInfo<OrderIdClrVo> selectOrderClrByPage(String pageNum, String pageSize,String orderIdClr,String areasId,String streetsId,String state) {
        PageHelper.startPage(Integer.parseInt(pageNum),Integer.parseInt(pageSize));
        List<OrderIdClrVo> orderIdClrVos = orderClrMapper.queryAllByPage(orderIdClr,areasId,streetsId,state);
        for (OrderIdClrVo o: orderIdClrVos
             ) {
            System.out.println(o);
        }
        return new PageInfo<>(orderIdClrVos);
    }
}
